/*这里放一些对于接口来说的活动私有接口，在独立的活动用到的调用方法*/
import axios from '@/utils/request'

/**
 * 吃蛋糕有入口playcake
 * 页面测试
 * @param {*} userId
 */
export function ifHomeCake(userId) {
  return axios({
    url: `/AnniversaryCake/ifHomeCake?t=${new Date().getTime()}`,
    methods: 'get',
    params: {
      userId
    }
  })
}

/*************************量贩改版V2****************************** */
/**top榜单****/
export function getDiscountTopApi() {
  return axios({
    url: `discountV2/top?t=${new Date().getTime()}`,
    methods: 'get',
    params: {}
  })
}
/**商品列表**/
export function getDiscountGoodsListApi(activityId, categoryId) {
  return axios({
    url: `discountV2/goodsList?t=${new Date().getTime()}`,
    methods: 'get',
    params: {
      activityId,
      categoryId
    }
  })
}

/*************************限量贩卖机 && 发售日历****************************** */
/**限量贩卖机****/
export function getLimitSaleApi(page,pageSize) {
  return axios({
    url: `/LimitOnsale/goodsList?t=${new Date().getTime()}`,
    methods: 'get',
    params: {page:page,pageSize:pageSize}
  })
}

export function getLimitBaseApi() {
  return axios({
    url: `/LimitOnsale/base?t=${new Date().getTime()}`,
    methods: 'get'
  })
}

export function getGoodsListApi(params) {
  return axios({
    url: `/LimitOnsale/goodsListV2?t=${new Date().getTime()}`,
    methods: 'get',
    params: params
  })
}

/*************************商家入驻****************************** */
/**发送短信****/
export function sendMessageCodeApi(telephone,userId) {
  return axios({
    url: `Supplier/sendMobile?t=${new Date().getTime()}`,
    method: 'post',
    data: {shopUserMobile:telephone,userId:userId}
  })
}
/***获取店铺信息 */
export function getStoreInfoApi(userId) {
  return axios({
    url: `Supplier/getShop?t=${new Date().getTime()}`,
    method: 'get',
    params: {userId:userId}
  })
}
/***保存店铺信息 */
export function saveStoreInfoApi(params) {
  return axios({
    url: `Supplier/saveShop?t=${new Date().getTime()}`,
    method: 'post',
    data: params
  })
}

/***获取企业信息 */
export function getBrandsInfoApi(userId) {
  return axios({
    url: `Supplier/getBusiness?t=${new Date().getTime()}`,
    method: 'get',
    params: {userId:userId}
  })
}
/***保存企业信息 */
export function saveBrandsInfoApi(params) {
  return axios({
    url: `Supplier/saveBusiness?t=${new Date().getTime()}`,
    method: 'post',
    data: params
  })
}

/***获取类目 */
export function getCategoryListApi() {
  return axios({
    url: `Supplier/getCategory?t=${new Date().getTime()}`,
    method: 'get'
  })
}

/***获取用户审核状态 */
export function getAuditStatusApi(userId) {
  return axios({
    url: `Supplier/getExamineStat?t=${new Date().getTime()}`,
    method: 'get',
    params:{userId:userId}
  })
}